package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;

public interface QuestionsTbl {
	public static final String TABLE_NAME = "QUESTIONS";

	public static final String COLUMN_ID = "_ID";

	public static final String COLUMN_QUESTION = "QUESTION";

	public static final String[] COLUMNS = { COLUMN_ID, COLUMN_QUESTION };

	public static final String CREATE_TABLE_QUESTIONS = " CREATE TABLE  IF NOT EXISTS "
			+ TABLE_NAME
			+ " ( "
			+ COLUMN_ID + " INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL,"
			+ COLUMN_QUESTION + " text);";

	public static final String INSERT_INTO_QUESTIONS = "INSERT INTO " + TABLE_NAME + " ( " + COLUMN_ID + "," + COLUMN_QUESTION + ") values (?,?)";

	public static final String COUNT_QUESTIONS = "SELECT COUNT(*) FROM " + TABLE_NAME;
	
	public long insertIntoQuestions(int id, String question) throws SQLiteException;
	
	public Cursor getQuestions(int index) throws SQLiteException;
	
	public Cursor getQuestionCount() throws SQLiteException;
}
